Don't let the width or height go below 1. (#516024, Christian Persch)
authorMatthias Clasen <mclasne@redhat.com>
Tue, 12 Feb 2008 16:35:02 +0000 (16:35 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 12 Feb 2008 16:35:02 +0000 (16:35 +0000)
2008-02-12  Matthias Clasen  <mclasne@redhat.com>

        * gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let
        the width or height go below 1.  (#516024, Christian Persch)

svn path=/trunk/; revision=19534

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-io.c

index 2c45fec75fd90024e336292108f929514f0aab65..7f978c423ce4523b62bc9cd055ac710d84e8356a 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-12  Matthias Clasen  <mclasne@redhat.com>
+
+       * gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let
+       the width or height go below 1.  (#516024, Christian Persch)
+
 2008-02-10  Matthias Clasen  <mclasne@redhat.com>
 
        * gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
index 206ed7962c59619e3e0783be721cc47d7e8932b9..30cffb37e20ffbb961a3401d8e206d0e867b85c0 100644 (file)
@@ -1048,6 +1048,9 @@ at_scale_size_prepared_cb (GdkPixbufLoader *loader,
                        height = info->height;
        }
        
+       width = MAX (width, 1);
+        height = MAX (height, 1);
+
        gdk_pixbuf_loader_set_size (loader, width, height);
 }